library(DiagrammeR)

Graphvis

grViz produces pdf-friendly graphs and it uses graphvis and DOT languauge behind the scene. See the documentation of DiagrammeR for more details.

Mermaid

/* to fix a rendering bug of mermaid */
.section {
   opacity: 1;
}

The function mermaid wraps the mermaid.js package and provides a number of interesting diagrams. Check https://mermaid-js.github.io/mermaid. However, these graphs are not pdf-friendly.

Reference

DiagrammeR: http://rich-iannone.github.io/DiagrammeR